﻿namespace Vibstudio.X4NET.Globalization
{
    public class Labeling<T, TK> where T : ILabelingProvider where TK : T, new()
    {
        private static readonly Labeling<T, TK> instance = new Labeling<T, TK>();

        public static Labeling<T, TK> Factory
        {
            get { return instance; }
        }

        protected Labeling()
        {
            Get = new TK();
        }

        public void SetAppLang(string lang)
        {
            instance.Get.AppLang = lang;
        }

        public void SetAppLangKey(string key)
        {
            instance.Get.AppLangKey = key;
        }

        public void SetAppLangFileName(string filename)
        {
            instance.Get.AppLangFileName = filename;
        }

        public T Get { get; private set; }
    }

    public sealed class Labeling : Labeling<ILabeling, Labeler>
    {
    }
}